package org.logMonitor.service;

import org.logMonitor.dto.ChinaMap;
import org.logMonitor.dto.Exposer;
import org.logMonitor.dto.Map2city;
import org.logMonitor.entity.Rule;

import java.util.List;

/**
 * Created by lenovo on 2018/1/18.
 */
public interface RuleService {
    /**
     * 添加规则
     * @return
     */
    int addRule(Rule rule);

    /**
     * 根据ruleId删除规则
     * @param ruleId
     * @return
     */
    int deletRule(int ruleId);

    /**
     * 修改规则
     * @param rule
     * @return
     */
    int updateRule(Rule rule);

    /**
     * 得到所有的规则
     * @return
     */
    List<Rule> getAllRule();

    /**
     * 根据ruleId得到规则
     * @param ruleId
     * @return
     */
    Rule getRuleById(int ruleId);
    /**
     * 根据当前规则id得到要展示的前5名，服务于模拟迁移地图
     * @param ruleId
     * @return
     */
    Map2city getChinaMapDateByRuleId(int ruleId) throws Exception;

    /**
     *
     * @param ruleId
     * @return
     */
    int openRule(int ruleId);

    /**
     *
     * @param ruleId
     * @return
     */
    int closeRule(int ruleId);
}
